<div class="x_panel">
  <div class="x_content" style="display: block;">
    <div class="nav navbar-right panel_toolbox">
      <a class="fa fa-plus" href="/partner/add.html">添加</a>
    </div>
    <br><br>
    <div class="row-fluid">
      <form action="/partner/index.html" method="get">
        <div class="col-md-3 col-sm-3 col-xs-3">
          <label class="control-label">合作商编号</label>
          <input type="text" class="form-control" name="form[partner_no]" value="{if isset($query.partner_no)}{$query.partner_no}{/if}">
        </div>
        <div class="col-md-3 col-sm-3 col-xs-3">
          <label class="control-label">合作商名称</label>
          <input type="text" class="form-control" name="form[partner_name]" value="{if isset($query.partner_name)}{$query.partner_name}{/if}">
        </div>
        <div class="col-md-3 col-sm-3 col-xs-3">
          <label class="control-label">联系电话</label>
          <input type="text" class="form-control" name="form[linkphone]" value="{if isset($query.linkphone)}{$query.linkphone}{/if}">
        </div>
        <div class="col-md-3 col-sm-3 col-xs-3">
          <label class="control-label">联系人</label>
          <input type="text" class="form-control" name="form[linkphone]" value="{if isset($query.linkman)}{$query.linkman}{/if}">
        </div>
        <button type="submit" class="btn btn-primary" style="">搜索</button>
      </form>
    </div>
    <br><br>
    <!--表格主体内容-->
    <div class="cont">
      <table class="table table-bordered table-striped">
        <thead>
        <tr>
          <th width="100px">合作商编号</th>
          <th>合作商名称</th>
          <th>联系人</th>
          <th>联系电话</th>
          <th>联系邮箱</th>
          <th>状态</th>
          <th>备注</th>
          <th>操作</th>
        </tr>
        </thead>
        <tbody>
        {foreach $partner.lists as $partneritem}
        <tr>
          <td>{$partneritem.partner_no}</td>
          <td>{$partneritem.partner_name}</td>
          <td>{$partneritem.linkman}</td>
          <td>{$partneritem.linkphone}</td>
          <td>{$partneritem.linkemail}</td>
          <td>{if $partneritem.partner_status==1}启用{else}停用{/if}</td>
          <td width="200px">{$partneritem.partner_remark}</td>
          <td>
            <div class="x_content">
              <a class="btn btn-primary btn-xs" href="{eval U(['partner/edit','partner_id'=>$partneritem.partner_id])}"> 编辑</a>
              <button class="btn btn-danger btn-xs" data-toggle="dropdown">{if $partneritem.partner_status==1}停用{else}启用{/if}
                <i class="icon-angle-down"></i></button>
              <ul class="dropdown-menu">
                <li><a href="{eval U(['partner/save-status','partner_id'=>$partneritem.partner_id])}">确定</a></li>
                <li><a href="javascript:;">取消</a></li>
              </ul>
            </div>
          </td>
        </tr>
        {/foreach}
        </tbody>
      </table>
      <!--分页-->
      {Yii::$app->view->render('/com/pager.php',['pager'=>$partner.pager])}
    </div>
  </div>
</div>
